package L618;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;

/**
 * @program: javase
 * @description:
 * @author: luolidong
 * @create: 2021-06-18 19:23
 * @version: 1.0
 */
public class NK1 {
    public static void main(String[] args) {
        HashSet<String> set = new HashSet<>();
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()){
            String[] s = scanner.nextLine().split(" ");
            for(String s1:s){
                if(!set.contains(s1)){
                    set.add(s1);
                }
            }
        }
        System.out.println(set.size());
        scanner.close();
    }
}
